Port SERVICEACCESS - TCP-CLIENT-SOCKET¶
TCP client network stack based on LwIP
Stimulation¶
此端口不具备激励能力。
Properties 🛈¶
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
Port |
string |
Name of the port inside a network. In Vector Hardware Config, the network-based mode must be activated. |
|||
Receive buffer size |
1000 |
int |
Number of messages which can be recorded in the receive buffer (ring buffer) |
||
Keep cyclic sending active |
☐ |
bool |
If the check mark is set, the cyclical sending of packets is only stopped at port stop or by the explicit call to ‘StopSendPacketCyclic’. Otherwise (default), the cyclic sending is already terminated at the end of the test. |
||
TLS |
[ONLINE] |
string |
[可选] 若要使用 TLS 保护连接,则为 TLS 端口的名称。必须在该工具上创建此 TLS 端口。 |
Jobs 🛈¶
ClearReceiveBuffer¶
Clears the ecu.test high-level receive buffer. Low-level buffers in the driver are not cleared.
CloseConnection¶
Closes opened TCP connection
Connect¶
Opens a TCP connection
Parameterization
Parameter
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
DevGw |
string |
String (Format: 192.168.0.1 / fd48:a7e0:36c1:42b6::1), Empty when the gateway is not needed |
|||
DevIp |
string |
Local IP address as a string (format: 192.168.0.1 / fd48:a7e0:36c1:42b6::1). It must be located in the same subnet as the IP address of the device under test, and must not be equal to the IP address of another participant or the IP address which the operating system assigned to the selected network interface. |
|||
DevSubnetMask |
‘Default’ |
string |
For IPv4 addresses a subnet mask or prefix length can be given (format: ‘255.255.255.0’ or ‘24’). ‘default’ uses the default subnet mask of the IP address’s (DevIp) network class. 对于 IPv6,只接受前缀长度,且不支持值 ‘default’。 |
||
EthSrcMac |
‘Default’ |
string |
String (format: 00:11:FF:1E:32:FF), leave ‘Default’ if the default MAC address should be used |
||
SoKeepAlive |
None |
int |
Keep Alive: None = ignore all keep-alive Parameters, 0 = keep-alive inactive, 1 = keep-alive active |
||
TargetHost |
‘192.168.0.1’ |
string |
Hostname or IP for outgoing TCP connection |
||
TargetPort |
30490 |
int |
Port for outgoing TCP connections |
||
TcpKeepIdle |
None |
int |
is the time in seconds without receiving data or confirmation packets for the connection until the first keep-alive packet will be transmitted. If None, this option will not be changed. |
||
TcpKeepIntvl |
None |
int |
The keep-alive interval is between two consecutive keep-alive repetitions if no confirmation of the previous keep-alive packet was received. If None, the option will not be changed. |
||
VlanCfi |
0 |
int |
Integer, is only used if VLAN is configured |
||
VlanOption |
‘no tagging’ |
[‘no tagging’, ‘single tagging’] |
string |
Used VLAN setting |
|
VlanPcp |
0 |
int |
Integer, is only used if VLAN is configured |
||
VlanVid |
1 |
int |
Integer, only used if VLAN tagging is enabled |
ConnectionInfo¶
Provides IP address and port of connected network end point.
Parameterization
返回值
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
result |
string |
Tuple of IP address (str) and port (int) or NotPresent |
ReceivePacket¶
Returns a packet from the receive buffer and removes it from there
Parameterization
返回值
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
result |
string |
Return value as ByteStream or NotPresent |
ReceiveSomeIpMessage¶
Returns a packet from the receive buffer, interprets it and filters the MessageId if necessary. If MultipleResults are enabled, a list with more than one object might be returned. The packet will be removed from the receive buffer.
Parameterization
Parameter
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
InterpretAs |
‘PacketSomeIp’ |
[‘PacketSomeIp’, ‘PacketSomeIpSd’] |
string |
Specifies which class a package is to be interpreted by. A packet is only returned if it could be successfully interpreted. |
|
MessageId |
object |
MessageIds which have to match for passing (empty / int / list with ints) |
|||
MultipleResults |
False |
[False, True] |
bool |
Boolean, if enabled a list with result objects will be returned |
返回值
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
result |
string |
Return value of specified type, list of it or NotPresent |
SendPacket¶
Send data
Parameterization
Parameter
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
Data |
string |
String, payload as a ByteStream |
StartSendPacketCyclic¶
Starts cyclic Transmission of a specified message
Parameterization
Parameter
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
CycleTime |
500 |
int |
Cycle time [ms] |
||
CyclicHandle |
int |
CyclicHandle can be defined manually. It must be an integer value greater than 0. Collision detection against already defined handles will not be performed. |
|||
Payload |
object |
Payload of the message to be sent cyclically. Either a byte stream can be specified directly or an object from a UserPyModule defined class. Further information on using the payload can be found in the help (Tool tracetronic: Ethernet). |
返回值
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
CyclicHandle |
int |
Handle for targeted deactivation of cyclic transmission of that particular message. |
StopSendPacketCyclic¶
Stops cyclic transmission
Parameterization
Parameter
Name |
在以下情况下可用 |
默认值 |
有效值 |
Type |
Description |
|---|---|---|---|---|---|
CyclicHandle |
int |
Handle of a message to stop its cyclic transmission. If None is specified, cyclic transmission of all messages is stopped. |